package wechat.rcv.cosuming;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import wechat.rcv.data.WeResponseBuilder;

@Component
public class EventScanConsuming implements IMsgConsuming {
	private RequestObj req;

	final static Logger logger = Logger.getLogger(EventScanConsuming.class.getName());
//	public EventScanConsuming() {
//	}

	@Override
	public String acceptSync() {
		String res_str = "欢迎回到****服务号!";
//	+ req.getEventKey();
//		res_str += "\n"+ req.getFromUserName();
		return WeResponseBuilder.createTxtMsg(req.getFromUserName(),req.getToUserName(),res_str);
	}

	@Override
	public String acceptAsync() {
		return acceptSync();
	}
	@Override
	public void setRequestObj(RequestObj ro) {
		// TODO Auto-generated method stub
		req = ro;
	}
}
